<style>
.fui-footer .btn {
    margin-top: .6rem;
}
	.order_detail .fui-list-inner .title.has-address {
		font-size: .7rem;
		line-height: 1.2rem;
		height: 1.2rem;
		display: block;
	}
	.order_detail .fui-list-inner .text{
		white-space: nowrap;
		text-overflow: ellipsis;
		overflow: hidden;
	}
	.order_detail .fui-list:before{
		border: 0;
	}
	.order_detail .fui-list_title{
		position: relative;
		display: flex;
		align-items: center;
		line-height: normal;
	}
	/*.order_detail .fui-list_title:before{*/
		/*content: " ";*/
		/*position: absolute;*/
		/*left: 0.5rem;*/
		/*right: 0.5rem;*/
		/*bottom: 0;*/
		/*height: 1px;*/
		/*border-top: 1px solid #ebebeb;*/
		/*color: #D9D9D9;*/
		/*-webkit-transform-origin: 0 0;*/
		/*-ms-transform-origin: 0 0;*/
		/*transform-origin: 0 0;*/
		/*-webkit-transform: scaleY(0.5);*/
		/*-ms-transform: scaleY(0.5);*/
		/*transform: scaleY(0.5);*/
	/*}*/
	.order_detail  .lineblock {
		position: relative;
		overflow: hidden;
	}
	.order_detail  .lineblock:before {
		content: "";
		position: absolute;
		left: .5rem;
		top: 0;
		right: .5rem;
		height: 1px;
		border-top: 1px solid #ebebeb;
		-webkit-transform-origin: 0 100%;
		-ms-transform-origin: 0 100%;
		transform-origin: 0 100%;
		-webkit-transform: scaleY(0.5);
		-ms-transform: scaleY(0.5);
		transform: scaleY(0.5);
	}
.fui-header:after {
	border-bottom: 0 solid #D9D9D9;
}
</style>
<div ng-include="sys_html('common/_header')"></div>
<link rel="stylesheet" type="text/css" href="../addons/jy_weishop/custom/templates/mobile/css/orderdetail.css?v=2.3">
	<div class="fui-page cav order_detail">
		<div class="jy2-headertopbg">
			<div class="fui-header" style="background:none">
				<div class="fui-header-left">
					<a class="back" style="color:#fff" href="javascript:" ng-click="goback()"></a>
				</div>
				<div class="title bold" style="font-size:1rem;color:#fff">账单详情</div>
				<div class="fui-header-right" style="padding-right:0.5rem;color:#fff">
					<i class="icon jinyunicon icon-liaotian" ng-click="access_json('jy_shop1miao/member.index/')" style="font-size: 1rem;"></i>
				</div>
			</div>
		</div>
		<div class="fui-content jy2-headertop" style="padding:0.5rem;padding-bottom:3rem">
			<!--商品信息-->
			<div class="fui-list-group radius" ng-repeat="(mk,m) in pagedata.merchs" style="margin-top:0">
				<div ng-show="!m.id" class="fui-list_title"><i class="icon icon-dianpu" style="margin-right: 0.25rem;"></i>{{pagedata.shopset.store_title || '平台自营'}}</div>
				<div ng-show="m.id" class="fui-list_title"><i class="icon icon-dianpu" style="margin-right: 0.25rem;"></i>{{m.merchname || '多商户'}}</div>
				<div class="fui-list" ng-repeat="g in m.goods">
						<div class="fui-list-media" href="javascript:" ng-click="access_json(pagedata.go_goodsitem+'/goods.detail//id='+g.id)">
							<img ng-src="{{tomedia(g.image) || '../core/resource/images/nopic.jpg'}}"/>
						</div>
						<div class="fui-list-inner">
							<div class="title"><span ng-show="g.seckill_task" class="fui-label fui-label-danger">{{g.seckill_task.tag}}</span>{{g.title}}</div>
							<div class="subtitle">套餐：{{g.selespename || '无规格'}} x {{g.total || 1}} /{{g.unit ||'件'}}<span ng-if="g.weight!='0.00'"> ({{g.weight}}kg)</span></div>
							<div class="text" style="font-size:0.65rem" ng-if="pagedata.order.is_zu==1">已选：{{g.total || '1'}}台、{{pagedata.order.api_data.title}}、￥{{pagedata.order.api_data.price}}/{{pagedata.order.api_data.unit}}</div>
							<div ng-show="g.libaolog && g.libaolog.id" class="text"><i class="fui-tag fui-tag-red">礼包</i> <span style="color:#999">内含<span class="red">{{g.libaolog.active_libaonum}}</span>个礼品 <span ng-if="g.libaolog.libaos.length==0" ng-click="pagedata.showchooselibaos=true;pagedata.nowlibao=g.libao;" class="red">待领取</span><span ng-if="g.libaolog.libaos.length>0" ng-click="pagedata.showlibaos=true;pagedata.nowlibao=g.libao" class="red">已领取</span></span></div>
							<span ng-show="g.status==3" class="btn btn-sm btn-default-o" href="javascript:" ng-click="access_json('jy_weishop/order.comment/comment/id='+g.id)">评价</span>
							<div class="text bold" style="font-size:0.7rem">总租金：￥{{pagedata.order.api_data.allprice || '0.00'}}</div>
						</div>
				</div>
				<div class="fui-cell-group radius" style="padding:0.5rem;padding-top:0;margin-top:0">
						<div class="col-jy">
							<div class="col-jy-2" style="width:42%;padding:0 0.2rem;border: 2px solid #ddd;">
								<div class="fui-cell" style="padding:0">
									<div class="fui-cell-label" style="width:1.5rem;border-radius: 1.5rem;height:2rem;line-height:2rem;">
										<image src="../addons/jy_shop1miao/resource/images/rqi.png" style="width:1.3rem;height:1.3rem;"/> 
									</div>
									<div class="fui-cell-info" style="margin-left:11.1rpx;text-align:left">
										<div class="text bold">起租日</div>
										<div class="subtitle">{{pagedata.order.api_data.starttime || '2021-08-08'}}</div>
									</div>
								</div>
							</div>
							<div class="col-jy-2 c" style="width:16%;line-height:2.6rem;">
								<image src="../addons/jy_shop1miao/resource/images/jiantou.png" style="width:1.2rem;height:1.2rem;"/> 
							</div>
							<div class="col-jy-2" style="width:42%;padding:0 0.2rem;border: 2px solid #ddd;">
								<div class="fui-cell" style="padding:0">
									<div class="fui-cell-label" style="width:1.5rem;border-radius: 1.5rem;height:2rem;line-height:2rem;">
										<image src="../addons/jy_shop1miao/resource/images/rqi.png" style="width:1.3rem;height:1.3rem;"/> 
									</div>
									<div class="fui-cell-info" style="margin-left:11.1rpx;text-align:left">
										<div class="text bold">归还日</div>
										<div class="subtitle">{{pagedata.order.api_data.endtime || '2021-08-18'}}</div>
									</div>
								</div>
							</div>
						</div>
						<div class="subtitle" style="font-size:0.6rem">
							提示：快递运输期间不算租期，实际起租日为物流签收后的第3天；归还日需寄出并提交快递单号。
						</div>
				</div>
		</div>
		<div class="fui-cell-group radius" style="padding-top:0;">
			<div ng-repeat="item in pagedata.order.zudan" class="fui-cell">
				  <div class="fui-cell-label c" style="width:auto;padding-right:0.5rem">
					<div class="bold">￥{{price(item.price) || '0.00'}}</div>
					<div class="subtitle">{{item.index}}/{{pagedata.order.api_data.allqi}}期</div>
				  </div>
				  <div class="fui-cell-text" style="font-size:0.7rem">{{item.desc}}</div>
				  <div class="fui-cell-remark noremark">
					<div ng-if="item.ispay!=1" class="btn btn-success" style="padding:0 1rem" href="javascript:;" ng-click="pagedata.onepay(item.index);">支付</div>
				  </div>
			</div>
		</div>
		<div class="fui-navbar" style="background:#09ba07;">
			<a href="javascript:;" ng-click="pagedata.allpay();" class="nav-item" style="color:#fff">全部支付</a>
		</div>
</div>
<script type="text/javascript">
scope.pagedata.onepay=function(qinum){
	var id=scope.pagedata.order.id;
	scope.post_json('jy_shop1miao/order.zudan/onepay/id='+id+'&qinum='+qinum,{},function(result){
		scope.pagedata.order_id=result.order_id;
		scope.$evalAsync();
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_shop1miao/order.list//');
				}else{
					scope.message('支付失败！','success','jy_shop1miao/order.list//');
				}
		},'','','jy_shop1miao/order.list//','jy_shop1miao/order.list//');
	});
}
scope.pagedata.allpay=function(){
	var id=scope.pagedata.order.id;
	scope.post_json('jy_shop1miao/order.zudan/allpay/id='+id,{},function(result){
		scope.pagedata.order_id=result.order_id;
		scope.$evalAsync();
		scope.tool.pay(result.pay_id,function(res){
				if(res.type=='success'){
					scope.message('支付成功！','success','jy_shop1miao/order.list//');
				}else{
					scope.message('支付失败！','success','jy_shop1miao/order.list//');
				}
		},'','','jy_shop1miao/order.list//','jy_shop1miao/order.list//');
	});
}
</script>